package com.cp_smss.util;

import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import com.cp_smss.model.User;

public class AuthProcesser {
	
	public static String make(String str){
		return md5(str);
	}
	
	private static String md5(String str){
		try {
			MessageDigest md5 = MessageDigest.getInstance("MD5");
			str = new sun.misc.BASE64Encoder().encode(md5.digest(str.getBytes("gb2312")));
		} catch (NoSuchAlgorithmException e) {
		}catch (UnsupportedEncodingException e) {
		}
		return str;
	}
	
}
